//
//  OAHistoryCell.m
//  OASystem
//
//  Created by zhoupengfei on 15/4/27.
//  Copyright (c) 2015年 zpf. All rights reserved.
//

#import "OAHistoryCell.h"

@implementation OAHistoryCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
    }
    return self;
    
}

+(instancetype)cellWihtTableView:(UITableView*)tableView{
    NSString * cellIdentifier = @"cellIdentifier";
    OAHistoryCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"OAHistoryCell" owner:nil options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
           UIView * separator = [[UIView alloc] initWithFrame:CGRectMake(0, cell.frame.size.height - 5, KScreenWidth, 5)];
     //   self.separator = separator;
      separator.backgroundColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:0.6];

        [cell addSubview:separator];

    }
    return cell;
    
}

-(void)setHistoryModel:(OAHistoryModel *)historyModel{
    _historyModel = historyModel;
    self.num.text = [NSString stringWithFormat:@"%@", historyModel.number];
    self.num.textColor = [UIColor redColor];
    self.step.text = [NSString stringWithFormat:@"处理步骤:%@", historyModel.setp];
    self.worker.text = [NSString stringWithFormat:@"处理人:%@", historyModel.worker];
    self.receiverDate.text = [NSString stringWithFormat:@"接收时间:%@", historyModel.receiveDate];
    self.sendTo.text = [NSString stringWithFormat:@"业务流向:%@", historyModel.sendto];
    self.completeTime.text = [NSString stringWithFormat:@"完成时间:%@", historyModel.completeTime];
    self.status.text = [NSString stringWithFormat:@"状态:%@", historyModel.status];
}

@end
